%> @file tool_matrix_thresholder.m
%> @brief A very simple tool that zeroes all the elements out which are
%> smaller than the given threshold.
%>
%> @author Mikhail V. Konnik
%> @date   17 May 2012
%>
%======================================================================
%> @param input_matrix	= the matrix being thresholded.
%> @param thresh        = the value of the threshold for the matrix: every value that is less than the threshold will be zeroed.
%>
%> @retval output_matrix = output thresholded matrix.
% ======================================================================
function output_matrix = tool_matrix_thresholder(input_matrix, thresh);

input_matrix(abs(input_matrix)<=thresh) = 0;

output_matrix = input_matrix;